<%-- 
    Document   : MostrarHabitaciones
    Created on : 16-dic-2014, 10:28:06
    Author     : sistemas
--%>

<%@page import="Beans.Habitacion"%>
<%@page import="java.util.LinkedList"%>
<%@page import="Beans.Hotel"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Lista de Habitaciones</title>
    </head>
    <style type="text/css">
                    body{
                        background-image: url("http://www.fondox.net/wallpapers/resoluciones/13/ciudad-de-nueva-york_1920x1200_304.jpg");
                        }
                        </style>
    <body>
        <TABLE id="results">
        
            <TR>
            <TD></TD> 
            <TD></TD>
            <TD>Numero</TD>
            <TD>Tipo</TD>
            <TD>Hotel</TD>
            <TD>Capacidad</TD>
            <td>Precio</td>
            </TR>
            <% LinkedList<Habitacion> listaH = (LinkedList<Habitacion>)request.getAttribute("ListaHab");
            for(Habitacion h: listaH){
               out.println("<TR>");
               out.println("<TD><input type=\"hidden\" name=\"IdHotel\" value=\""+h.getUnHotel().getIdHotel()+"\" /></TD>");
               out.println("<TD><input type=\"hidden\" name=\"Numero\" value=\""+h.getNumero()+"\" /></TD>");
               out.println("<TD>"+h.getTipo()+"</TD>");
               out.println("<TD>"+h.getUnHotel().getNombre()+"</TD>");
               out.println("<TD>"+h.getCapacidad()+"</TD>");
               out.println("<TD>"+h.getPrecio()+"</TD>");
               out.println("<TD><a href=\"Reservar.jsp?IdHotel="+h.getUnHotel().getIdHotel()+"&Numero="+h.getNumero()+"\"</a>Reservar</TD>");
               out.println("</TR>");
            }
            %>
   </TABLE>
    </body>
</html>
